package com.system.common;

public enum OrderEnum {
	
	NOPAY("0040001","待付款"),
	WAIT_USE("0040002","待使用"),
	WAIT_EVLU("0040003","待评价"),
	FINISH("0040004","已完成"),
	REFUND("0040005","已退款");
	
	private String code;
    private String value;
    
    OrderEnum(String code,String value){
    	this.code = code;
    	this.value = value;
    }
    
    public String getValue() {
        return value;
    }

    public String getCode() {
        return code;
    }
	
    public static String getEnum(int code){
        for(OrderEnum e : OrderEnum.values()){
            if(e.getCode() .equals(code) ){
                return e.value;
            }
        }
        throw new RuntimeException("么有找到对应的枚举");
    }

}
